import { request } from 'ice';

// 获取单个设备详情
export async function getDeviceInfo (id) {
  return await request(`/api/devices/${id}`);
}

// 更新单个设备详情
export async function putDeviceInfo(id, device) {
  return await request({
    url: `/api/devices/${id}`,
    method: 'put',
    data: device
  })
}

// 获取单个设备路由
export async function getDeviceRoutes (id) {
  return await request(`/api/devices/${id}/routes`);
}